HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/orbi-individual/node_modules/next/dist/esm/lib/format-dynamic-import-path.js
import path from "path";
import { pathToFileURL } from "url";
/**
 * The path for a dynamic route must be URLs with a valid scheme.
 *
 * When an absolute Windows path is passed to it, it interprets the beginning of the path as a protocol (`C:`).
 * Therefore, it is important to always construct a complete path.
 * @param dir File directory
 * @param filePath Absolute or relative path
 */ export const formatDynamicImportPath = (dir, filePath)=>{
    const absoluteFilePath = path.isAbsolute(filePath) ? filePath : path.join(dir, filePath);
    const formattedFilePath = pathToFileURL(absoluteFilePath).toString();
    return formattedFilePath;
};

//# sourceMappingURL=format-dynamic-import-path.js.map